blktap/fs-back: Build fixes for Fedora 13
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 15 Mar 2010 17:08:29 +0000 (17:08 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 15 Mar 2010 17:08:29 +0000 (17:08 +0000)
1. Some files use stat, mkfifo, mkdir etc. without including
sys/stat.h

2. Some programs link against libpthread without a -lpthread compile
option. The compile used to work if this library happened to be used
by one of the other libraries that was being linked against, but
Fedora 13 has stopped allowing this.

From: M A Young <m.a.young@durham.ac.uk>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/blktap/drivers/Makefile
tools/blktap/drivers/blktapctrl.c
tools/blktap/drivers/block-qcow2.c
tools/blktap2/drivers/block-remus.c
tools/blktap2/vhd/lib/libvhd.c
tools/blktap2/vhd/lib/vhd-util-scan.c
tools/fs-back/Makefile

index ed6fcbe6f72347e47c5e22307962e8fbafd4a365..e1e2e1bc3f9cdb4d51295c72a80c34397cff61f1 100644 (file)
@@ -29,7 +29,7 @@ CFLAGS += -DMEMSHR
 MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a
 endif
 
-LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm
+LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread
 LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz
 
 BLK-OBJS-y  := block-aio.o
index d1bc79f303363e6fb777452cb9c61f90115c94f5..db6dab5f3c4aa528d91eb4e200f9d62adca6f728 100644 (file)
@@ -51,6 +51,7 @@
 #include <sys/time.h>
 #include <syslog.h>
 #include <memshr.h>
+#include <sys/stat.h>
                                                                      
 #include "blktaplib.h"
 #include "blktapctrl.h"
index b0392e1802d8504bed7e361ca54fcd5975bb5780..ceda4f012488109d1011d37beccfafe8ac4aea7f 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/stat.h>
 
 #include "tapdisk.h"
 #include "tapaio.h"
index a068878385021fec872716a761cb2544c102a097..f6da984e274f5a0f0589410aef4d1f696411d62a 100644 (file)
@@ -57,6 +57,7 @@
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #include <unistd.h>
+#include <sys/stat.h>
 
 /* timeout for reads and writes in ms */
 #define HEARTBEAT_MS 1000
index ae691a0a1eda375a0a93b620a7f9abdaf557f3bb..bc9649a639653988307a12fed8c64d1fbdf0046f 100644 (file)
@@ -36,6 +36,7 @@
 #include <libgen.h>
 #include <iconv.h>
 #include <sys/mman.h>
+#include <sys/stat.h>
 
 #include "libvhd.h"
 #include "relative-path.h"
index 8fa9376ec7f099fb31a9a2569fdfcc56d380db65..e87a7eae000a48b2a05aebc1653744d24f491f7d 100644 (file)
@@ -34,6 +34,7 @@
 #include <unistd.h>
 #include <fnmatch.h>
 #include <libgen.h>    /* for basename() */
+#include <sys/stat.h>
 
 #include "list.h"
 #include "libvhd.h"
index db6ce6f9cf49aa4ef543b0d29ce7492b5f243172..3d0ea81a251e84464f3921a799e73b7dd8059503 100644 (file)
@@ -16,7 +16,7 @@ CFLAGS   += -D_GNU_SOURCE
 LIBS      := -L. -L.. -L../lib
 LIBS      += $(LDFLAGS_libxenctrl)
 LIBS      += $(LDFLAGS_libxenstore)
-LIBS      += -lrt 
+LIBS      += -lrt -lpthread
 
 OBJS     := fs-xenbus.o fs-ops.o